Skip to content

Add support for PHP 8.4 property hooks#42

Open
thekid wants to merge 2 commits intomainfrom
feature/property-hooks-support
Open

Add support for PHP 8.4 property hooks#42
thekid wants to merge 2 commits intomainfrom
feature/property-hooks-support

Conversation

@thekid
Copy link
Member

@thekid thekid commented May 18, 2024

See https://wiki.php.net/rfc/property-hooks, including support for @property-read and @property-write properties via API docs for PHP < 8.4

  • New lang.reflection.Property::virtual() method, see here
  • Get hook methods for a given virtual properties

use test\verify\Condition;
use test\{Assert, Expect, Test};

#[Condition(assert: 'method_exists(ReflectionProperty::class, "getHooks")')]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot yet use PHP_VERSION_ID here as php/php-src#13455 is yet to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant